#ifndef _MOTE_H
#define _MOTE_H

#include <time.h>
#include <iostream>
#include "globals.h"

using namespace std;

/**
 * \brief Mote is class that describes a single mote
 * \author Khalid Alhokail, Vineet Gupta, Oren Melzer, David Schneider
 *
 */
class Mote
{
	public:
	
	Mote(int id);
	~Mote();
	void SetReading(READING_T reading);
	READING_T Reading() const;
	TAG_T GetTag();
	void SetTag(TAG_T tag);
	bool setLEDs(short LEDs);
	short getLEDs();
	
	//Gives the time that the last set of data was recieved about this node
	//If no data has been recieved, the value should be 0, the value for January 1, 1970
	TIMING_T RecievedTime() const;
	int SecondsSinceRecievedTime() const;
	
	int GetId() const {return id;}

	private:
	READING_T reading;
	TAG_T tag;
	TIMING_T recievedTime;
	short LEDs;
	// The ID of the note as specified in the install command of TinyOS that programs the mote
	int id;
	
};

ostream& operator<<(ostream& out, const Mote& m);

#endif /* _MOTE_H */
